var t = getApp();

Page({
    data: {},
    onLoad: function(t) {
        console.log(t), this.setData({
            close: t.close,
            text: t.text
        });
    },
    onShow: function() {
        var e = t.getCache("sysset").shopname;  
        t.removeCache("userinfo")
        wx.setNavigationBarTitle({
            title: e || "提示"
        });
    },
    bind: function(e) {
        var t = this,that=this; 
        that.data.getAuthLoop = setInterval(function () {
          wx.getSetting({
            success: function (tt) {
              var a = tt.authSetting["scope.userInfo"] || false;
              console.log(a)
              if (!!a) {
                clearInterval(that.data.getAuthLoop);
                getApp().getUserInfo(), wx.reLaunch({
                  url: "/pages/index/index"
                });
              }
            }
          })
        }, 1000);       
    },
    onHide: function () {
      clearInterval(this.data.getAuthLoop)
    }
});